#ifndef __LASERDIS_H
#define __LASERDIS_H			 
#include "sys.h"

enum{
	READ_DATA = 0X01,
	READ_DEVICE_NUM = 0X02,
	SET_DEVICE_ADDR = 0X03,
};

enum{
	DEVICE0 = 0X80,
	DEVICE1 = 0X81,
	DEVICE2 = 0X82,
	DEVICE3 = 0X83,
};

enum{
	Freq_5HZ = 0X05,
	Freq_10HZ = 0X10,
	Freq_20HZ = 0X20,
};

enum{
	RES_1MM = 0X01,
	RES_01MM = 0X02,
};

extern float Laser_dis1,Laser_dis2,Laser_dis3,Laser_dis4;
void Laser_Addr_Set(uint8_t addr);
void Laser_ReadCmd_Send(uint8_t cmd);
void Laser_Set_Device_Num(uint8_t num);
void Laser_Light_Ctr(uint8_t addr,uint8_t mode);
void Laser_Set_Range(uint8_t ls);
void Laser_Set_Freq(uint8_t f);
void Laser_Set_Resolution(uint8_t res);
void Laser_Single_Measure(uint8_t addr);
void Laser_Dis_Analys(uint8_t buf[256],float *dis1,float *dis2,float *dis3,float *dis4);

double parse_str_to_num(uint8_t buf[],uint8_t len);
uint8_t ascii_to_num(uint8_t ascii);

#endif	   




